/*
 * @Date: 2021-12-09 20:55:48
 * @LastEditors: LeeKing
 * @LastEditTime: 2021-12-09 21:34:43
 * @FilePath: \demo\src\store\modules\RentList.js
 */
import { getRentList } from '@/api/house.js'
const state = {
  RentList: [],
  IsShow: true
}
const mutations = {
  setRent (state, payload) {
    state.RentList = payload
  }
  // isShowDiv (state, payload) {
  //   state.IsShow = payload
  // }
}
const actions = {
  async getRent (context) {
    const res = await getRentList()
    console.log(res)
    context.commit('setRent', res.data.body)

    // if(res.data.body.length)
  }

}
const getters = {}

export default {
  namespaced: true,
  state,
  mutations,
  actions,
  getters
}
